let http =require('http');

let Server=http.createServer((request,response)=>{

     
});

Server.listen(8080,'www.lius.com',()=>{
    console.log('服务器已启动');
});

// Server.listen({
//     host: 'www.lius.com',
//     port: 8080,
//     exclusive: true
//   });
Server.on(('request'),(request,response)=>{
    response.setHeader('content-type','text/plain;charset=utf-8');
    response.write('中国');
    response.end();
});

// Server.on(('request'),(request,response)=>{
//     response.setDefaultEncoding('utf8');
//     response.write('中国');
//     response.end();
// });
